// Project name:JavaRedis
// Creator:muhong
// Date time:2022/12/14,11:32 下午
// Name:RejectedExceptionHandlers

package org.gmh.util.concurrent;

import java.util.concurrent.RejectedExecutionException;

public class RejectedExceptionHandlers {

    private static final RejectedExceptionHandler REJECT = new RejectedExceptionHandler() {
        @Override
        public void rejected(Runnable task, SingleThreadEventExecutor executor) {
            throw new RejectedExecutionException();
        }
    };

    public static RejectedExceptionHandler reject(){
        return REJECT;
    }
}
